﻿@using GdHotel.Data.Resources
@using GdHotel.Web.Models
@model NewsModel
@{
    ViewBag.Title = Model.SingleNews.Title;
}

@section gallery{
    @if (Model != null && Model.Gallery != null)
    {
        <text>@Html.Partial("_ShowGallery", Model.Gallery)</text>
    }
}

				<div class="wrap">

					<!--content-->
					<div class="content">
						<!--in_content-->
						<div class="in_content down clearfix">
							<!--block-->
							<div class="block">
								<h1>@Model.SingleNews.Title</h1>
								<div class="in_block">									
									<p class="news_date">@Model.SingleNews.PublicationDate.ToString("dd MMMM yyyy")</p>

									@Html.Raw(Model.SingleNews.Text)
								</div>

								<div class="news_photo">
                                    @if (Model.SingleNews != null && !String.IsNullOrEmpty(Model.SingleNews.PicturePath))
                                    {
                                        <div class="shadow">
                                            <div class="photo_wrap"><img src="@Url.Content(Model.SingleNews.PicturePath)" width="638px" height="353px" alt="" /></div>
                                        </div>
                                    }
								</div>
							</div>
							<!--/block-->							
						</div>
						<!--/in_content-->

					</div>
					<!--/content-->					
					<!--sidebar-->
					<div class="sidebar">
						<!--in_sidebar-->
						<div class="in_sidebar down clearfix">	
							<h2>@Localization.OtherNews</h2>
							<ul class="news_list">
                                @foreach (var pieceOfNews in Model.News)
                                {
                                    <li>
                                        <p class="news_date">@pieceOfNews.PublicationDate.ToString("dd MMMM yyyy")</p>
                                        <h4><a href="@Url.Action("Show", new {id = pieceOfNews.Id})">@pieceOfNews.Title</a></h4>
                                        <p>@pieceOfNews.ShortText</p>
                                    </li>
                                }
							</ul>

							<p class="more"><a href="@Url.Action("Index", "News")">@Localization.ReadMore</a></p>
						</div>
						<!--/in_sidebar-->						
					</div>
					<!--/sidebar-->
				</div>